import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue' 
import Panel from '../views/Panel.vue';

Vue.use(VueRouter)

const routes = [
  // 重定向login
  {
    path:'/',
    redirect:'/login'
  },
  {
    path:'/login',
    component:Login
  },
  {
    path:'/register',
    component:Register
  },
  {
    path: '/panel',
    component: Panel
  }
]

const router = new VueRouter({
  routes
})

export default router
